<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="../../assets/css/bootstrap.min.css"/>
    <!-- text fonts -->
    <link rel="stylesheet" href="../../assets/css/fonts.googleapis.com.css"/>
    <link rel="stylesheet" href="../../assets/font-awesome/4.5.0/css/font-awesome.min.css"/>
    <!-- page specific plugin styles -->
    <link rel="stylesheet" href="../../assets/css/jquery-ui.min.css"/>
    <link rel="stylesheet" href="../../assets/css/bootstrap-datepicker3.min.css"/>
    <!-- ace styles -->
    <link rel="stylesheet" href="../../assets/css/ace.min.css" class="ace-main-stylesheet" id="main-ace-style"/>
    <link rel="stylesheet" href="../../assets/css/jquery-ui.min.css"/>
    <link rel="stylesheet" href="../../assets/css/login/member.css" class="ace-main-stylesheet"/>
   <link rel="stylesheet" href="../../assets/css/admin.css">
    <!--[if lte IE 9]>
    <link rel="stylesheet" href="../../assets/css/ace-part2.min.css" class="ace-main-stylesheet"/>
    <link rel="stylesheet" href="../../assets/css/ace-ie.min.css"/>
    <![endif]-->
    <!-- inline styles related to this page -->
    <!-- ace settings handler -->
    <script src="../../assets/js/ace-extra.min.js"></script>
    <!-- HTML5shiv and Respond.js for IE8 to support HTML5 elements and media queries -->
    <!--[if lte IE 8]>
    <script src="../../assets/js/html5shiv.min.js"></script>
    <script src="../../assets/js/respond.min.js"></script>
    <![endif]-->
</head>
<body data-spy="scroll" data-target="#nav-sidebar">
<div class="navbar navbar-default navbar-fixed-top" id="navbar">
    <div class="navbar-container" id="navbar-container">
        <div class="navbar-header pull-left">
            <a href="#" class="navbar-brand">
                <small>激想后台管理系统</small>
            </a>
            <!-- /.brand -->
        </div>
        <!-- /.navbar-header -->

        <div class="navbar-header pull-left " role="navigation"></div>

        <div class="navbar-header pull-right" role="navigation">


            <nav class="navbar navbar-inverse navbar-fixed-top boots-navbar-sm" role="navigation">
                <div class="container-fluid">
                    <div class="navbar-header navbar-right ">
                        <ul class="nav  navbar-nav">
                            <!--   <li class="dropdown">
                                  <a href="#" role="button" class="dropdown-toggle" data-toggle="dropdown" style="color: #fff"> <i class="glyphicon glyphicon-bell"></i> 提醒中心 <i class="caret"></i></a>
                                  <ul class="dropdown-menu">
                                      <li><a href="#">1</a></li>
                                      <li><a href="#">2</a></li>
                                      <li><a href="#">3</a></li>
                                      <li role="presentation" class="divider"></li>
                                      <li><a href="index.html">Logout</a></li>
                                  </ul>
                              </li> -->

                            <li>
                                <a href="#" style="color: #fff"> <i class="glyphicon glyphicon-user"></i>您好,admin_auth
                                </a>
                            </li>

                            <li>
                                <a href="/jixiang-web-admin/auth/admPage/updatePwd.jsp" style="color: #fff">修改密码</a>
                            </li>
                            <li>
                                <a href="/jixiang-web-admin/admin/admUser/loginout" style="color: #fff"> 退出</a>
                            </li>

                        </ul>
                    </div>
                </div>
            </nav>
            <nav class="nav navbar-default navbar-fixed-top under-navbar-fixed-top box-shadow-1" role="navigation">
                <div class="container-fluid">

                    <div class="navbar-header ">

                    </div>
                    <div class="navbar-header navbar-right mr-350" style="margin-right: 1500px !important;">
                        <ul class="nav navbar-nav">


                        </ul>

                    </div>

                </div><!-- /.container-fluid -->
            </nav>


            <!-- /.ace-nav -->
        </div>
        <!-- /.navbar-header -->
    </div>
    <!-- /.container -->
</div>
<div class="main-container" id="main-container">
    <div class="main-container-inner">
        <div class="sidebar responsive sidebar-fixed" id="sidebar">
            <ul class="nav nav-list sly">
                <!-- wehotel na_left begin-->


                <div class="sidebar responsive sidebar-fixed" id="sidebar">

                    <ul class="nav nav-list sly" id="jixiang">
                        <li id="qxgl" class="active" style="display: none;"><a href="#" class="dropdown-toggle"> <i
                                class="fa fa-lg fa-user"></i> <span class="menu-text">权限管理</span> <b
                                class="arrow icon-angle-down"></b>
                        </a>
                            <ul class="submenu">

                                <li id="qxgl1"><a href="/jixiang-web-admin/admin/admUser/show"> <i
                                        class="icon-double-angle-right"></i>用户管理
                                </a></li>

                                <li id="qxgl2"><a href="/jixiang-web-admin/admin/admRole/show"> <i
                                        class="icon-double-angle-right"></i>角色管理
                                </a></li>
                                <li id="qxgl3"><a href="/jixiang-web-admin/admin/admPerm/show"> <i
                                        class="icon-double-angle-right"></i>功能管理
                                </a></li>
                            </ul>
                        </li>


                    </ul>
                    <div class="sidebar-collapse" id="sidebar-collapse">
                        <i class="fa fa-angle-double-left" data-icon1="fa fa-angle-double-left"
                           data-icon2="fa fa-angle-double-right"></i>
                    </div>
                </div>
                <!-- wehotel na_left end-->
            </ul>
            <div class="sidebar-collapse" id="sidebar-collapse">
                <i class="icon-double-angle-left"
                   data-icon1="icon-double-angle-left"
                   data-icon2="icon-double-angle-right"></i>
            </div>
        </div>
        <div class="main-content ">
            <div class="breadcrumbs" id="breadcrumbs">
                <ul class="breadcrumb">
                    <li><i class="icon-home home-icon"></i>角色列表</li>
                </ul>
                <div class="pull-right"></div>
            </div>
            <div class="page-content">
                <div class="tabbable">
                    <div class="span10">
                        <div id="toolbar" class="pull-right">
                            <shiro:hasPermission name="admRole_add">
                                <button type="button" class="btn btn-primary" data-toggle="modal"
                                        data-target=".bs-example-modal-lg">新增角色
                                </button>
                            </shiro:hasPermission>
                        </div>

                        <div class="container-fluid">
                            <div class="row-fluid">
                                <div class="modal fade bs-example-modal-lg" tabindex="-1"
                                     id="addUserDiv" role="dialog" aria-labelledby="myLargeModalLabel"
                                     aria-hidden="true">
                                    <div class="modal-dialog modal-lg">
                                        <div class="modal-content">
                                            <div class="modal-header">
                                                <button type="button" class="close" data-dismiss="modal">
                                                    <span aria-hidden="true">&times;</span><span
                                                        class="sr-only">Close</span>
                                                </button>
                                                <h4 class="modal-title">添加角色</h4>
                                            </div>
                                            <div class="modal-body">
                                                <form class="form-horizontal" id="addRole" method="POST"
                                                      action="/jixiang-web-admin/admin/admRole/add">
                                                    <fieldset>
                                                        <legend></legend>
                                                        <div class="control-group">
                                                            <label class="control-label" for="roleName">角色名称<span
                                                                    class="required">*</span></label>
                                                            <div class="controls">
                                                                <input type="text" class="span6 validate[required]"
                                                                       id="roleName" name="rName">
                                                            </div>
                                                        </div>
                                                        <div class="control-group">
                                                            <label class="control-label" for="roleCode">角色代码<span
                                                                    class="required">*</span></label>
                                                            <div class="controls">
                                                                <input type="text" class="span6 validate[required]"
                                                                       id="roleCode" name="rCode">
                                                            </div>
                                                        </div>
                                                        <legend></legend>
                                                    </fieldset>
                                                </form>
                                            </div>
                                            <div class="modal-footer">
                                                <button type="button" class="btn btn-default"
                                                        data-dismiss="modal">关闭
                                                </button>
                                                <button type="button" class="btn btn-primary"
                                                        onclick="saveRole()">保存
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                </div>


                                <div class="modal" tabindex="-1"
                                     role="dialog" aria-labelledby="myLargeModalLabel"
                                     aria-hidden="true" id="update">
                                    <div class="modal-dialog modal-lg">
                                        <div class="modal-content">
                                            <div class="modal-header">
                                                <button type="button" class="close" data-dismiss="modal">
                                                    <span aria-hidden="true">&times;</span><span
                                                        class="sr-only">Close</span>
                                                </button>
                                                <h4 class="modal-title">修改角色</h4>
                                            </div>
                                            <div class="modal-body">
                                                <form class="form-horizontal" id="updateRole" method="POST"
                                                      action="/jixiang-web-admin/admin/admRole/update">
                                                    <fieldset>
                                                        <legend></legend>
                                                        <div class="control-group">
                                                            <label class="control-label" for="roleName">角色名称<span
                                                                    class="required">*</span></label>
                                                            <div class="controls">
                                                                <input type="text" class="span6 validate[required]"
                                                                       id="rName" name="rName">
                                                                <input type="hidden" class="span6 validate[required]"
                                                                       id="rId" name="rId">
                                                            </div>
                                                        </div>
                                                        <legend></legend>
                                                    </fieldset>
                                                </form>
                                            </div>
                                            <div class="modal-footer">
                                                <button type="button" class="btn btn-default"
                                                        data-dismiss="modal">关闭
                                                </button>
                                                <button type="button" class="btn btn-primary"
                                                        onclick="update()">保存
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <table id="example" class="table table-striped table-bordered" cellspacing="0"
                                       width="100%">
                                    <thead>
                                    <tr>
                                        <th>ID</th>
                                        <th>角色名称</th>
                                        <th>角色代码</th>
                                        <th>操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>

                                    <tr>
                                        <td>1</td>
                                        <td>超级管理员</td>
                                        <td>admin</td>
                                        <td>
                                            <shiro:hasPermission name="admRole_assignPerm">
                                                <a href="javascript:void(0)"
                                                   onclick="assignPermission('ca335c88da1d4adda7544040980326cf')">添加功能</a>
                                            </shiro:hasPermission>
                                            <shiro:hasPermission name="admRole_delPerm">

                                            </shiro:hasPermission>
                                            <shiro:hasPermission name="admRole_delete">
                                                <a href="javascript:void(0)"
                                                   onclick="delRole('ca335c88da1d4adda7544040980326cf')">删除角色</a>
                                            </shiro:hasPermission>
                                            <shiro:hasPermission name="admRole_add">
                                                <a href="javascript:void(0)"
                                                   onclick="updateRole('ca335c88da1d4adda7544040980326cf','超级管理员')"
                                                   data-toggle="modal" data-target="#update">修改角色</a>
                                            </shiro:hasPermission>
                                        </td>
                                    </tr>

                                    <tr>
                                        <td>2</td>
                                        <td>商品管理员</td>
                                        <td>spgl_001</td>
                                        <td>
                                            <shiro:hasPermission name="admRole_assignPerm">
                                                <a href="javascript:void(0)"
                                                   onclick="assignPermission('f688dff25c354819b12a36a084797ebe')">添加功能</a>
                                            </shiro:hasPermission>
                                            <shiro:hasPermission name="admRole_delPerm">

                                            </shiro:hasPermission>
                                            <shiro:hasPermission name="admRole_delete">
                                                <a href="javascript:void(0)"
                                                   onclick="delRole('f688dff25c354819b12a36a084797ebe')">删除角色</a>
                                            </shiro:hasPermission>
                                            <shiro:hasPermission name="admRole_add">
                                                <a href="javascript:void(0)"
                                                   onclick="updateRole('f688dff25c354819b12a36a084797ebe','商品管理员')"
                                                   data-toggle="modal" data-target="#update">修改角色</a>
                                            </shiro:hasPermission>
                                        </td>
                                    </tr>

                                    <tr>
                                        <td>3</td>
                                        <td>供货商</td>
                                        <td>ghs</td>
                                        <td>
                                            <shiro:hasPermission name="admRole_assignPerm">
                                                <a href="javascript:void(0)"
                                                   onclick="assignPermission('8564909ff39b4b44886494eb25861036')">添加功能</a>
                                            </shiro:hasPermission>
                                            <shiro:hasPermission name="admRole_delPerm">

                                            </shiro:hasPermission>
                                            <shiro:hasPermission name="admRole_delete">
                                                <a href="javascript:void(0)"
                                                   onclick="delRole('8564909ff39b4b44886494eb25861036')">删除角色</a>
                                            </shiro:hasPermission>
                                            <shiro:hasPermission name="admRole_add">
                                                <a href="javascript:void(0)"
                                                   onclick="updateRole('8564909ff39b4b44886494eb25861036','供货商')"
                                                   data-toggle="modal" data-target="#update">修改角色</a>
                                            </shiro:hasPermission>
                                        </td>
                                    </tr>

                                    <tr>
                                        <td>4</td>
                                        <td>激想供货商</td>
                                        <td>jixiang</td>
                                        <td>
                                            <shiro:hasPermission name="admRole_assignPerm">
                                                <a href="javascript:void(0)"
                                                   onclick="assignPermission('110fc4a21afc41039d0eb9d68ccab82a')">添加功能</a>
                                            </shiro:hasPermission>
                                            <shiro:hasPermission name="admRole_delPerm">

                                            </shiro:hasPermission>
                                            <shiro:hasPermission name="admRole_delete">
                                                <a href="javascript:void(0)"
                                                   onclick="delRole('110fc4a21afc41039d0eb9d68ccab82a')">删除角色</a>
                                            </shiro:hasPermission>
                                            <shiro:hasPermission name="admRole_add">
                                                <a href="javascript:void(0)"
                                                   onclick="updateRole('110fc4a21afc41039d0eb9d68ccab82a','激想供货商')"
                                                   data-toggle="modal" data-target="#update">修改角色</a>
                                            </shiro:hasPermission>
                                        </td>
                                    </tr>

                                    <tr>
                                        <td>5</td>
                                        <td>顶级管理员</td>
                                        <td>1</td>
                                        <td>
                                            <shiro:hasPermission name="admRole_assignPerm">
                                                <a href="javascript:void(0)"
                                                   onclick="assignPermission('37cb07eac0d14c0aa4eb9e73326aae23')">添加功能</a>
                                            </shiro:hasPermission>
                                            <shiro:hasPermission name="admRole_delPerm">

                                            </shiro:hasPermission>
                                            <shiro:hasPermission name="admRole_delete">
                                                <a href="javascript:void(0)"
                                                   onclick="delRole('37cb07eac0d14c0aa4eb9e73326aae23')">删除角色</a>
                                            </shiro:hasPermission>
                                            <shiro:hasPermission name="admRole_add">
                                                <a href="javascript:void(0)"
                                                   onclick="updateRole('37cb07eac0d14c0aa4eb9e73326aae23','顶级管理员')"
                                                   data-toggle="modal" data-target="#update">修改角色</a>
                                            </shiro:hasPermission>
                                        </td>
                                    </tr>

                                    </tbody>
                                </table>


                                <ul class="pagination pull-right">


                                    <li class="active"><a href="javaScript:;">1<span
                                            class="sr-only">(current)</span></a></li>


                                </ul>


                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!--[if !IE]> -->
<script src="../../assets/js/jquery-2.1.4.min.js"></script>
<!-- <![endif]-->
<!--[if IE]>
<script src="../../assets/js/jquery-1.11.3.min.js"></script>
<![endif]-->
<!-- page specific plugin scripts -->
<script src="../../assets/js/wizard.min.js"></script>
<script src="../../assets/js/jquery.validate.min.js"></script>
<script src="../../assets/js/jquery-ui.min.js"></script>
<script src="../../assets/js/bootstrap-datepicker.min.js"></script>
<!--province city district-->
<script type="text/javascript" src="../../assets/js/distpicker.js"></script>
<!--avatar upload-->
<script src="../../assets/js/cropbox.js"></script>
<!-- ace scripts -->
<script src="../../assets/js/ace-elements.min.js"></script>
<script src="../../assets/js/ace.min.js"></script>
<!--avatar upload-->
<script src="../../assets/js/cropbox.js"></script>
<!--app scripts-->
<script src="../../assets/javascripts/app.js"></script>
<script type="text/javascript">
    var basePath = '/jixiang-web-admin';
    function doShow(id) {
        $("#jixiang li").hide();
        $("#" + id).show();
        $("#" + id + " li").show();
        $("#" + id + "_").css('color', '#ff6423');
        $("#" + id + "_").css("background-color", "#e7e7e7");
    }
    $(function () {
        var pId = 'qxgl';
        if (pId != '' && pId != null) {
            doShow(pId);
        } else {
            doShow('qxgl');
        }
    });


</script>
</body>
</html>